class Memory < ActiveRecord::Base
  attr_accessible :description, :price, :title, :product_url, :capacity, :speed, :typemem
  acts_as_heir_of :product

  validates :description, :price, :title, :product_url, :capacity, :speed, :typemem, presence: true
  validates :price, numericality: {greater_than_or_equal_to: 0.01}
  #validates :title, uniqueness: true  ---> En la clase padre
  validates :capacity, :speed, numericality: {greater_than_or_equal_to: 512}
end
